﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HMS_Hospital_Team2._6.DA;
using System.Data;

namespace HMS_Hospital_Team2._6.BL
{
    class PhongBanBL
    {
        // DA
        PhongBanDA pb = new PhongBanDA();

        // Hàm Load Data lên gridview
        public DataTable LoadDuLieuBL()
        {
            return pb.LoadDuLieuDA();
        }

        // Hàm load Data tên loại PB lên Combobox
        public DataTable LoadDuLieuTlpb()
        {
            return pb.LoadDuLieuTlpb();
        }


        public DataTable LoadDuLieu_Banthu(string sMaphongBan)
        {
            return pb.LoadDuLieu_Banthu(sMaphongBan);
        }
        // Hàm load Data tên nhóm DV lên Combobox
        public DataTable LoadDuLieuTnDV()
        {
            return pb.LoadDuLieuTnDV();
        }

        // Hàm thêm mới phòng ban
        public static void TaoMoiPB(string sMaPB,string MaLpb, string TenPb, string MaNdv, string Ghichu, bool Trangthai)
        {
            DA.PhongBanDA.TaoMoiPB(sMaPB, MaLpb, TenPb, MaNdv, Ghichu, Trangthai);

        }

        // Hàm sửa phòng ban
        public static void SuaPB(string sMaPB, string MaLpb, string TenPb, string MaNdv, string Ghichu, bool Trangthai)
        {
            DA.PhongBanDA.SuaPB(sMaPB,MaLpb, TenPb, MaNdv, Ghichu, Trangthai);
        }

    }
}
